﻿using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;

namespace BabyShop.WebSite.Utility
{
    public class PresetRepository
    {
        public static ICollection<string> AllAreas { get; private set; }

        public static ICollection<string> AllControllers { get; private set; }

        public static ICollection<string> AllActions { get; private set; }

        public static void Init(string[] areaPaths, string[] areaNameSpaceFormats)
        {
            AllAreas = new Collection<string>();
            AllControllers = new Collection<string>();
            AllActions = new Collection<string>();
            ActionsHelper actionHelper = new ActionsHelper();
            foreach (string areaPath in areaPaths) {
                AllAreas.ToList().AddRange(actionHelper.GetAllAreas(areaPath));
            }
        }
    }
}